 <meta charset="utf-8">
<div class="box box-primary" id="app_salaryPercentage_add">
            <form role="form" id="editForm">
              <div class="box-body" style="overflow: hidden;">
                 <div class="form-group">
                  <label for="name">授薪人员姓名</label>
                  <input type="text"  readonly="readonly" v-on:click="chooseSalariedstaff" v-model="salaryPercentage.salariedstaffName"  name="salariedstaffName" class="form-control" id="salariedstaffName" placeholder="点击选择" required>
                </div> 
                
               <div class="form-group">
                  <label for="name">转入律师</label>
                  <input type="text"  readonly="readonly" v-on:click="chooseFromPractitioner"  v-model="salaryPercentage.fromPractitionerName"  name="fromPractitionerName" class="form-control" id="fromPractitionerName" placeholder="" required>
               </div>
                <div class="form-group">
                  <label for="caseNum">案号</label>
                  <input type="text"   v-model="salaryPercentage.caseNum"  name="caseNum" class="form-control" id="caseNum" placeholder="" required>
                </div>
                 <div class="form-group">
                  <label for="caseNum">金额<span class="text-danger">(单位元)</span></label>
                  <input type="number"   v-model="salaryPercentage.amount"  name="amount" class="form-control" id="amount" placeholder="" required>
                </div> 
                
              <div class="form-group">
                <label for="createTime">时间</label>
                 <input type="text"  v-kmdate="{vmodel:'salaryPercentage.createTime',format:'yyyy-MM-dd'}"  class="form-control"  v-model="salaryPercentage.createTime">
            </div>
            
              <div class="form-group">
                  <label for="name">当事人姓名</label>
                  <input type="text"   v-model="salaryPercentage.clientName"  name="clientName" class="form-control" id="clientName" placeholder="" >
               </div>
               
              <div class="form-group">
                  <label for="name">当事人电话</label>
                  <input type="text"   v-model="salaryPercentage.clientPhone"  name="clientPhone" class="form-control" id="clientPhone" placeholder="" >
               </div>
 
    			<div class="form-group">
                  <label for="caseProgress" >案件进展</label>
                  <select v-model="salaryPercentage.caseProgress" id="caseProgress" name="caseProgress"  class="form-control"  required >
                    <option value="1">立案</option>
                    <option value="2">结案</option>
                  </select>
                </div>
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancle">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-on:click="add">提交</button>
              </div>
            </form>
		
<script type="text/javascript">
var vm = new Vue({
        el: '#app_salaryPercentage_add',
        data: {
        	salaryPercentage:{
	        		salariedstaffName: null,
	        		salariedstaff: null,
	        		caseNum: null,
	        		amount: null,
	        		createTime: null,
	        		clientName: null,
	        		clientPhone: null,
	        		fromPractitionerName: null,
	        		fromPractitionerId: null,
	        		caseProgress: null
        		 },
        	    bus:new Vue()
        },
        mounted:function(){
        	let _this=this;
          
   	  },
         methods: {
        	 add: function () {
        	    	if($("#editForm").valid()){
        	    		let _this=this;
        	    		var url="/tcms/salaryPercentage/addSalaryPercentage";
        	    		zfesAjax.ajaxTodo(url,_this.$data.salaryPercentage, function(data){
        	    			alertSwal.successText(data.message);
        	    			zfesLayerEditDg.close();
        	    		});
        	    	}
        	    },
        	  	chooseSalariedstaff: function(){
        	  		let _this=this;
        	    	let url="/view/tcms/salariedstaff/salariedstaff.lookback.html";
        	    	let param={}
        	    	zfesLayerEditDg.lookback(url, param, "选择授薪人员", 600, function() {
        	    		 let data =zfesLayerEditDg.getCallBackParam();
        	    		 _this.salaryPercentage.salariedstaffName=data.name;
        	    		 _this.salaryPercentage.salariedstaff=data.id;
        	    	})
        	  	  },
        	  	chooseFromPractitioner: function(){
        	  		let _this=this;
        	    	let url="/view/tcms/practitioner/practitioner.lookback.html";
        	    	let param={}
        	    	zfesLayerEditDg.lookback(url, param, "转入律师", 600, function() {
        	    		 let data =zfesLayerEditDg.getCallBackParam();
        	    		 _this.salaryPercentage.fromPractitionerName=data.name;
        	    		 _this.salaryPercentage.fromPractitionerId=data.id;
        	    	})
        	  	  },
        	    cancle:function(){
        	    	zfesLayerEditDg.close();
        	    	 
        	    }
        }
    })

 </script>
</div>